<template>
	<view class="signup">
		<view class="signup-group">
			<view class="signup-title">
				<image class="top-image" src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg" mode="scaleToFill" />
			</view>
			<view class="box">
				<view class="tag-group">
					<view class="tag">
						<text class="success-tag">已签约</text>
					</view>
				</view>
				<view class="button-group">
					<button v-for="(item, index) in buttonData" :key="index" class="custom-button" type="primary"
						@tap="goRouter(item.url)">
						{{ item.name }}
					</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { ref } from 'vue';

	const buttonData = ref([
		{
			name: '续租',
			url: '/pages/contract/LeaseRenewal'
		},
		{
			name: '转租',
			url: '/pages/contract/sublet'
		},
		{
			name: '退租',
			url: '/pages/contract/surrender'
		},
		{
			name: '物业交割',
			url: '/pages/property/property'
		},
		{
			name: '企业人入住',
			url: '/pages/signup/companySignup'
		}
	]);

	const goRouter = (url : string) => {
		uni.navigateTo({
			url
		});
	};
</script>

<style scoped>
	.signup-title {
		height: 200px;
	}

	.button-group {
		display: flex;
		width: 100%;
	}

	.custom-button {
		width: 80px;
		font-size: 13px;
		height: 30px;
		margin-right: 10px;
		
	}
</style>